
order_number = "DH202301010001"
order_time = "2023-01-01 08:56:19"
cashier = "管理员"

# 定义商品信息（名称、单价、金额，默认数量1）
product1 = ["金士怀U盘8G", 40.00, 40.00]
product2 = ["性创16GTF卡", 50.00, 50.00]
product3 = ["读卡器", 8.00, 8.00]
product4 = ["网统2米", 5.00, 5.00]

# 定义汇总信息
total_quantity = 4  # 总数
total_amount = 103.00  # 总额/折后总额/实收
change = 0.00  # 找零
# 打印订单信息
print(f"单号: {order_number}")
print(f"时间: {order_time}")
print(f"{'名称':<12}{'单价':<8}{'金额':<8}")  # 格式化对齐
print(f"{product1[0]:<12}{product1[1]:<8.2f}{product1[2]:<8.2f}")
print(f"{product2[0]:<12}{product2[1]:<8.2f}{product2[2]:<8.2f}")
print(f"{product3[0]:<12}{product3[1]:<8.2f}{product3[2]:<8.2f}")
print(f"{product4[0]:<12}{product4[1]:<8.2f}{product4[2]:<8.2f}")
print(f"总数: {total_quantity}        总额: {total_amount:.2f}")
print(f"折后总额: {total_amount:.2f}    实收: {total_amount:.2f}")
print(f"找零: {change:.2f}            收银: {cashier}")
